import processing.core.*;

public class RandomPixels extends PApplet {

  public static void main(String[] args) {
    PApplet.main(new String[] {"RandomPixels"});
  }
  
  public void setup(){
    size(1024, 768); // we set the size of the canvas window
    background(255); // white background
    
    // we load the pixels - it generates a table pixels[] - type int
    loadPixels();
    
    // we update each pixel
    for(int i = 0; i < pixels.length; i++){
      pixels[i] = color(random(255), random(255), random(255)); // we set the current pixel to a random values for all three channels
    }
    
    // we update all the pixels on the canvas
    updatePixels();
  }
  
  public void draw(){}
}
